<%@include file="/jsp/taglib.jspf" %>

<c:forEach items="${category.subcategories}" var="item">
    <div class="treeItem">
        <span>
            ${item.description}
        </span>
        <c:if test="${not empty item.subcategories}">
            <img src="${path}/images/common/arrow/collapsed.png" id="collapse_img_${item.id}" onclick="expand(this,'#expand_img_${item.id}','#child_${item.id}'); loadPage($('#child_${item.id}'),'${path}/topicCategory.do?action=geSubcategories&id=${item.id}')" alt="expand"/>
            <img src="${path}/images/common/arrow/expanded.png"  id="expand_img_${item.id}" style="display: none" onclick="collapse(this,'#collapse_img_${item.id}','#child_${item.id}')" alt="expand"/>
        </c:if>
        <div class="float-right">
            <a href="${path}/topicCategory.do?action=delete&id=${item.id}" title="Delete ${item.description}" class="icon_16 delete"/>
            <a href="${path}/topicCategory.do?action=edit&id=${item.id}" title="Edit ${item.description}" class="icon_16 edit"/>
        </div>
        <span id="child_${item.id}" >
        </span>
    </div>
</c:forEach>
